package com.bosssoft.cloud.wechat.common.bean.einvoice;

import com.bosssoft.cloud.wechat.infrastructure.util.EStrUtil;
import lombok.Data;

/**
 * @author wcy create on 2021/5/17 15:47 下午
 */
@Data
public class EinvoiceDTO {
    /**
     * 电子票据代码
     */
    private String eInvoiceCode;
    /**
     * 电子票据号码
     */
    private String eInvoiceNumber;
    /**
     * 校验码
     */
    private String randomNumber;
    /**
     * 交款人
     */
    private String payerPartyName;
    /**
     * 用户身份id
     */
    private String userId;
    /**
     * 用户类型（1微信OPENID，2xxxx未定）
     */
    private Integer userType;
    /**
     * png
     */
    private String pngBase64;
    /**
     * 查验类型 0_手工查验；1_扫码查验
     */
    private String qrType;
    /**
     * 开票单位名称
     */
    private String invoicingPartyName;
    /**
     * 开票日期
     */
    private String issueDate;
    /**
     * 票据金额
     */
    private String totalAmount;

    public String toStringSimple() {
        return "EinvoiceDTO{" +
                "eInvoiceCode='" + eInvoiceCode + '\'' +
                ", eInvoiceNumber='" + eInvoiceNumber + '\'' +
                ", randomNumber='" + randomNumber + '\'' +
                ", payerPartyName='" + payerPartyName + '\'' +
                ", userId='" + userId + '\'' +
                ", userType=" + userType +
                ", pngBase64='" + EStrUtil.simpleStr(pngBase64) + '\'' +
                ", qrType='" + qrType + '\'' +
                ", invoicingPartyName='" + invoicingPartyName + '\'' +
                ", issueDate='" + issueDate + '\'' +
                ", totalAmount='" + totalAmount + '\'' +
                '}';
    }


    /* the constant of field {@link EinvoiceDTO#pngBase64} for trans bean */
    public static final String CONST_PNG_BASE64_ELECTRONIC = "invoice";

    /* the constant of field {@link EinvoiceDTO#eInvoiceCode} */
    public static final String CONST_E_INVOICE_CODE = "eInvoiceCode";
    /* the constant of field {@link EinvoiceDTO#eInvoiceNumber} */
    public static final String CONST_E_INVOICE_NUMBER = "eInvoiceNumber";
    /* the constant of field {@link EinvoiceDTO#randomNumber} */
    public static final String CONST_RANDOM_NUMBER = "randomNumber";
    /* the constant of field {@link EinvoiceDTO#payerPartyName} */
    public static final String CONST_PAYER_PARTY_NAME = "payerPartyName";
    /* the constant of field {@link EinvoiceDTO#userId} */
    public static final String CONST_USER_ID = "userId";
    /* the constant of field {@link EinvoiceDTO#userType} */
    public static final String CONST_USER_TYPE = "userType";
    /* the constant of field {@link EinvoiceDTO#pngBase64} */
    public static final String CONST_PNG_BASE64 = "pngBase64";
    /* the constant of field {@link EinvoiceDTO#qrType} */
    public static final String CONST_QR_TYPE = "qrType";
    /* the constant of field {@link EinvoiceDTO#invoicingPartyName} */
    public static final String CONST_INVOICING_PARTY_NAME = "invoicingPartyName";
    /* the constant of field {@link EinvoiceDTO#issueDate} */
    public static final String CONST_ISSUE_DATE = "issueDate";
    /* the constant of field {@link EinvoiceDTO#totalAmount} */
    public static final String CONST_TOTAL_AMOUNT = "totalAmount";
}
